<template>
  <div class="operation-container">
    <div class="btn-group">
      <el-button type="primary" icon="el-icon-plus" @click="$emit('add')">手动添加</el-button>
      <el-button type="success" icon="el-icon-download" @click="$emit('crawl')">爬取铝价</el-button>
    </div>
    <div class="btn-group">
      <el-button type="danger" icon="el-icon-delete" 
        :disabled="selectedCount === 0" 
        @click="$emit('batch-delete')">
        批量删除<span v-if="mobileView && selectedCount > 0">({{ selectedCount }})</span>
      </el-button>
    </div>
  </div>
</template>

<script>
export default {
  name: 'ActionButtons',
  props: {
    selectedCount: {
      type: Number,
      default: 0
    },
    mobileView: {
      type: Boolean,
      default: false
    }
  }
}
</script> 